package xyz.zq.codegen.controller;


import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.zq.codegen.entity.User;
import xyz.zq.codegen.service.IUserService;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zq
 * @since 2020-04-05
 */
@RestController
@RequestMapping("/codegen/user")
public class UserController {


    @GetMapping("/{id}")
    public User query(@PathVariable Integer id) {
//        return userService.selectById(id);
        User user = new User();
        user.setId(id);
        return user.selectById();
    }

}
